package main;

import com.nanosl.lib.db.Manager;
import com.nanosl.lib.log.Loggings;
import com.nanosl.lib.net.Net;
import javax.swing.JOptionPane;
import nanotheme.NanoTheme;
import ui.Theme;
import util.Data;

public class Main {

    public static void main(String[] args) {
        String pu = "cbisPU";
        for (String string : args) {
            pu = string;
        }
        try {
            NanoTheme.apply(Theme.hifi);
            Manager.init(pu, "192.168.1.10", "cbis_batik", "abc", "123");
//            Manager.setPu(pu);
//            Manager.setDatabase("cbis_batik");
//            Data.setVersion("0.a.00");
            Net.sendIP(Data.getParams().get("company").toString());
            LoginView.display();
//            Fix.fix();
        } catch (Throwable e) {
            JOptionPane.showMessageDialog(null, "Contact System Administrator \n +94724666666", "Exiting", JOptionPane.ERROR_MESSAGE);
            Loggings.logError("Main", e);
            System.exit(0);
        }
    }
}
